<template>
  <view class="legal-terms-container">
    <view class="content-area">
      <rich-text :nodes="richText"></rich-text>
    </view>
  </view>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { useRequest } from '@/api'
const { API_USER_AGREEMENT } = useRequest()
const richText = ref('')
onMounted(() => {
  API_USER_AGREEMENT().then(res => {
    if (res.code === 1) {
      richText.value = res.data.useragreement
    }
  })
})
</script>

<style lang="scss" scoped>
.legal-terms-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.content-area {
  flex: 1;
  padding: 20rpx;
}
</style>